package com.eleven.trades.controller;

import com.eleven.trades.entity.User;
import com.eleven.trades.mapper.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @author eleven
 */
@Controller
public class Login {

    @Autowired
    UserMapper userMapper;

    @RequestMapping("/")
    public String hello(){return "index";}

    @RequestMapping("/userLogin")
    public String login(){
        return "欢迎光临";
    }
    @RequestMapping("/insert")
    public String insert(){
        User user = new User();
        user.setUserId(123);
        user.setUserCard("32343");
        userMapper.insert(user);
        return "欢迎光临";
    }

}
